<?php $campaign = $sf_data->getRaw('campaign') ?>

<!-- Campaign Info -->
<?php if($campaign): ?>
<h2>Campaign Info</h2>
<table>
	<thead>
		<tr>
    <?php foreach(array_keys($campaign) as $field): ?>
    	<th style="padding:5px 20px"><?php echo $field; ?></th>
    <?php endforeach; ?>
    </tr>
	</thead>
	<tbody>
		<tr>
      <?php foreach($campaign as $val): ?>
      <td><?php echo $val; ?></td>
      <?php endforeach; ?>
	  </tr>
  </tbody>
</table>
<?php endif; ?>

<!-- Campaign Performance Information -->
<?php if($campaignPerformance): ?>
<h2>Campaign Performance</h2>
<table>
  <thead>
    <tr>
      <td>Reaction</td>
      <td>Value</td>
    </tr>
  </thead>
  <tbody>
<?php foreach($campaignPerformance as $key=>$reactionCount): ?>
    <tr>
      <td><?php echo $key; ?></td>
      <td><?php echo $reactionCount ?></td>
    </tr>
<?php endforeach; ?>
  </tbody>
</table>
<?php endif; ?>